package DP.chainOfResponsibility.common;

import DP.chainOfResponsibility.common.bean.Request;
import DP.chainOfResponsibility.common.bean.Response;
import DP.chainOfResponsibility.common.handler.impl.ConcreteHandler1;
import DP.chainOfResponsibility.common.handler.impl.ConcreteHandler2;
import DP.chainOfResponsibility.common.handler.impl.ConcreteHandler3;
import DP.chainOfResponsibility.common.handler.Handler;

/**
 * @author msi
 * 场景类
 */
public class Client {
    public static void main(String[] args) {
        Handler handler1=new ConcreteHandler1();
        Handler handler2=new ConcreteHandler2();
        Handler handler3=new ConcreteHandler3();
        handler1.setNext(handler2);
        handler2.setNext(handler3);
        Response echo = handler1.handleMessage(new Request());
    }
}
